<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">

                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">
        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title">基本信息</div>
            <table class="layui-table">
                <tbody>

                <tr><td class="tt">项目名称</td><td id="enginname" class="colorlan tv" colspan="3"></td></tr>
                <tr><td class="tt">退库单号</td><td id="number" colspan="3" class="tv"></td></tr>
                <tr><td class="tt">退库日期</td><td id="tuidt" colspan="3" class="tv"></td></tr>
                <tr><td class="tt">退料人</td><td id="baner" colspan="3" class="tv"></td></tr>

                </tbody>
            </table>
        </div>


        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>

        <div class="table-box tablenes">
            <script type="text/html" id="toolbarDemo">退库明细</script>
            <div class="tableShow">
                <table id="datalist" lay-filter="datalist"></table>
            </div>
        </div>



    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_stuff_tui_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;
                var engininfo = res.data.engininfo;


                $("#enginname").text(engininfo.name).click(function () {
                    openPage('../engin/show.php?id='+engininfo.id);
                });




                $("#number").text(data.number);
                $("#tuidt").text(data.tuidt);
                $("#baner").text(data.baner);

                var mytableList = table.render({
                    elem: "#datalist",data:res.data.list, toolbar: '#toolbarDemo', page: false
                    ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                    ,defaultToolbar: TabInitShow.defaultToolbar,filter: TabInitShow.filter ,text: TabInitShow.text
                    ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                    , cols: [[
                        {type:'numbers',title:'序号',fixed:'left'}
                        ,{field: 'name', title: '物资名称及规格'}
                        ,{field: 'unit', title: '单位'}
                        ,{field: 'gonger', title: '供应商'}
                        ,{field: 'runum', title: '入库数量'}
                        ,{field: 'chunum', title: '累计出库数量'}
                        ,{field: 'tuinum', title: '已退库数量'}
                        ,{field: 'num', title: '本次退库数量'}
                        ,{field: 'explain', title: '备注'}
                    ]]
                    , done: function (res) {
                        soulTable.render(this);
                    }
                });




                render_from();
            }
        });

    });



</script>
</body>
</html>




